package com.ln.aop01.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/11 17:02
 */
@Component
@Aspect
public class AnnotationAopPost {
    @Pointcut("@annotation(org.springframework.web.bind.annotation.PostMapping)")
    public void postAop(){}

    @Before("postAop()")
    public void before(){
        System.out.println("添加post的前置日志");
    }
}
